﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using Model;
namespace BLL
{
    public class HouseOrderManage
    {
        public static int AddOrder(HouseOrder order) {
            if (HouseOrderService.HasOrdered(order.ClientId, order.HouseId))
                return 0;
            return HouseOrderService.AddOrder(order);
        }
        public static bool HasOrdered(int clientId, int houseId)
        {
            return HouseOrderService.HasOrdered(clientId, houseId);
        }

        public static List<HouseOrder> GetHouseOrdersByUserId(int userId)
        {
            return HouseOrderService.GetHouseOrdersByUserId(userId);
        }

        public static List<HouseOrder> GetHouseOrdersByClientId(int clientId)
        {
            return HouseOrderService.GetHouseOrderByClientId(clientId);
        }

        public static List<HouseOrder> GetHouseOrderByHouseId(int houseId)
        {
            return HouseOrderService.GetHouseOrderByHouseId(houseId);
        }
    }
}
